package com.yjm.test.Spring5.ch3.lookupMethodInjection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.yjm.test.Spring5.ch3.Singer;

@Component("standardLookupBean")
public class StandardLookupDemoBean implements DemoBean {
	private Singer mySinger;
	
	@Autowired
	@Qualifier("singer")
	public void setMySinger(Singer mySinger) {
		this.mySinger = mySinger;
	}

	@Override
	public Singer getMySinger() {
		// TODO Auto-generated method stub
		return mySinger;
	}

	@Override
	public void doSomething() {
		// TODO Auto-generated method stub
		mySinger.sing();
	}

}
